-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: display a Network switch button when connected on the wrong chain #4027
Conversation
lint remove wrong chain warning remove commented code .
Branch preview✅ Deploy successful! Storybook: |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Twelve Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1465 tests passing in 201 suites. Report generated by 🧪jest coverage report action from 041ec5f |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Looks good, my suggestions are:
Question: once the network is switched, will the signature request pop up automatically? |
After the network is switched, the normal execute button will show so it would be a separate action. |
console.log(container) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(container) |
@@ -45,17 +45,17 @@ import { useMemo, useState } from 'react' | |||
export const NetworkFee = ({ | |||
totalFee, | |||
chain, | |||
willRelay, | |||
strikethrough, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strikethrough
refers to how it looks instead of its function. It should be something like isWaived
instead.
ESLint Summary View Full Report
Report generated by eslint-plus-action |
variant="contained" | ||
disableElevation | ||
> | ||
{isDisabled ? 'Waiting on confirmation in wallet...' : 'Confirm'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting on confirmation in wallet...
– that's a long piece of text for a button, how does it look in this state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to a loading spinner like we have it on the execute/sign buttons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
@TanyaEfremova could you do a final design and usability review?
ESLint Summary View Full Report
Report generated by eslint-plus-action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how the button looks like, however, it seems that the button and the message are too far from each other. After testing it out, it looks like they are disconnected from each other. I wonder if it would make sense to combine the alert and the button together following the pattern that we already have? (e.g. see creating a wallet screen)
Yeah sure, makes sense! So the warning would have the switch network button and then the execute/sign button would just be disabled, is that right? |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Looks good, @jmealy! |
The button to go to the safe creation page doesn't work. This was an issue reported in the #4020 a few weeks ago. It had to do with the list of safe not opening. |
The rest looks fine. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
What it solves
Resolves #3743
How this PR fixes it
How to test it
This affects any place where you perform an action using your connected wallet, where you wallet network must match your safe network:
Screenshots
Execute tx modal while wallet is on the wrong chain:
Changing notifications settings:
Activating CF safe:
Checklist